Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'permission_callback' error on WordPress 5.5 #219

Merged
merged 1 commit into from
Sep 1, 2020

Conversation

phpbits
Copy link
Contributor

@phpbits phpbits commented Aug 21, 2020

Description of the Change

Fix permission_callback error when using WordPress version 5.5. I've added __return_true since it's a public endpoint which is stated here : https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/#permissions-callback

Benefits

Prevent these errors from showing/logging.

Screen Shot 2020-08-22 at 2 40 40 AM

Possible Drawbacks

None.

Verification Process

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests passed.

Applicable Issues

Changelog Entry

@jeffpaul jeffpaul added this to the 1.6.0 milestone Sep 1, 2020
@jeffpaul jeffpaul added the type:bug Something isn't working. label Sep 1, 2020
@jeffpaul
Copy link
Member

jeffpaul commented Sep 1, 2020

Thanks for helping resolve this @phpbits, its greatly appreciated!

@jeffpaul jeffpaul merged commit b8ce434 into 10up:develop Sep 1, 2020
@phpbits
Copy link
Contributor Author

phpbits commented Sep 1, 2020

@jeffpaul No problem :) Happy to be of help!

@dkotter dkotter mentioned this pull request Oct 16, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PHP Notice: REST API route definition missing the required permission_callback argument
3 participants